{% macro gen_table(enterprise_dispatch_rules, enterprise_id=enterprise_id) %}
    <table id="cancel-attention-user-info-table"
           class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>派单规则</th>
                <th>操作</th>
            </tr>
        </thead>
        {% for each in enterprise_dispatch_rules %}
        <tbody>
            <tr>
                <td>
                    颜色：{{ each['color'] }}&nbsp;&nbsp;&nbsp;间距：{{ each['span'] }}
                    &nbsp;&nbsp;&nbsp;符号：{{ each['size_op'] }}
                    &nbsp;&nbsp;&nbsp;面积：{{ each['size'] }}
                </td>

                <td>
                    <a
                        class="btn btn-xs btn-primary"
                        href="{{
                                url_for('enterprise_bp.enterprise_dispatch_rule_edit',
                                enterprise_id=enterprise_id, time_stamp=each['time_stamp']) }}"
                        target="_self"
                    >编辑</a><br>
                    <a
                        class="btn btn-xs btn-danger" style="margin: 3px;"
                        href="{{
                                url_for('enterprise_bp.enterprise_dispatch_rule_delete',
                                enterprise_id=enterprise_id, time_stamp=each['time_stamp']) }}"
                        target="_self"
                        onclick="return confirm('确定要删除这条规则吗?')"
                    >删除</a><br>
                </td>
            </tr>
        </tbody>
        {% endfor %}
    </table>
{% endmacro %}
